/* 搜索头部组件样式 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 1.6rem;
    font-family: "Source Sans Pro", sans-serif;
    background-color: #f4f5f7;
    overflow-x: hidden;
}

a {
    color: #565656;
    text-decoration: none;
    transition: color 0.5s;
    -moz-transition: color 0.5s;
    -webkit-transition: color 0.5s;
    -o-transition: color 0.5s;
}

a:hover {
    color: #07CDFA;
}

/* 搜索头部容器 */
.search-header-container {
    position: relative;
    width: 100%;
    height: 240px;
    transition: z-index 0.3s ease;
    -webkit-transition: z-index 0.3s ease;
    -moz-transition: z-index 0.3s ease;
    -o-transition: z-index 0.3s ease;
}

/* 搜索框区域样式 */
.sousuokuang {
    position: absolute; 
    left: 50%;
    top: 35%;
    width: 600px;
    max-width: 90%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    /* 确保作为下拉框的定位基准 */
    z-index: 20 !important;  /* 使用 search-container 层级 */
}

.searchIpt {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    border-width: 0px;
    background-color: #fcfcfd;
    box-shadow: 0 0 8px rgba(78,70,70,0.16);
    -webkit-box-shadow: 0 0 8px rgba(78,70,70,0.16);
    -moz-box-shadow: 0px 0px 8px rgba(78,70,70,0.16);
    height: 50px;
    border-radius: 25px;
    padding-left: 60px;
    font-size: 18px;
    outline: 0;
    -webkit-outline: 0;
    transition: box-shadow ease-in-out .15s, background-color ease-in-out .15s;
    -moz-transition: box-shadow ease-in-out .15s, background-color ease-in-out .15s; 
    -webkit-transition: box-shadow ease-in-out .15s, background-color ease-in-out .15s; 
    -o-transition: box-shadow ease-in-out .15s, background-color ease-in-out .15s; 
}

input::-ms-clear {
    display: none;
}

.searchIpt:focus {
    background-color: #fff;
    box-shadow: 0 1px 8px rgba(78,70,70,0.66);
    -webkit-box-shadow: 0 0px 8px rgba(78,70,70,0.66);
    -moz-box-shadow: 0px 0px 8px rgba(78,70,70,0.66);
    outline: 0;
}

/* 翻转Logo样式 */
.flip-container-OK {
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;
    -ms-transform: perspective(1000px);
    -moz-transform: perspective(1000px);
    -moz-transform-style: preserve-3d; 
    -ms-transform-style: preserve-3d; 
    position: absolute; 
    top: 8%;
    left: 48%;
    margin-left: -37.5px;
}

.flip-container-OK.backimgOK .back-OK {
    -webkit-transform: rotateX(0deg);
    -moz-transform: rotateX(0deg);
    -o-transform: rotateX(0deg);
    -ms-transform: rotateX(0deg);
    transform: rotateX(0deg);
}

.flip-container-OK.backimgOK .front-OK {
    -webkit-transform: rotateX(180deg);
    -moz-transform: rotateX(180deg);
    -o-transform: rotateX(180deg);
    transform: rotateX(180deg);
}

.flip-container-OK, .front-OK, .back-OK {
    width: 135px; 
    height: 52px;
}

.flipper-OK {
    -webkit-transition: 0.6s;
    -webkit-transform-style: preserve-3d;
    -ms-transition: 0.6s;
    -moz-transition: 0.6s;
    -moz-transform: perspective(1000px);
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transition: 0.6s;
    transform-style: preserve-3d;
    position: relative;
    cursor: pointer;
}

.flip-container-OK .flipper-OK {
    -webkit-transform-origin: 100% 213.5px;
    -moz-transform-origin: 100% 213.5px;
    -ms-transform-origin: 100% 213.5px;
    transform-origin: 100% 213.5px;
}

.front-OK, .back-OK {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transition: 0.6s;
    -webkit-transform-style: preserve-3d;
    -webkit-transform: rotateY(0deg);
    -moz-transition: 0.6s;
    -moz-transform-style: preserve-3d;
    -moz-transform: rotateY(0deg);
    -o-transition: 0.6s;
    -o-transform-style: preserve-3d;
    -o-transform: rotateY(0deg);
    -ms-transition: 0.6s;
    -ms-transform-style: preserve-3d;
    -ms-transform: rotateY(0deg);
    transition: 0.6s;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    position: absolute;
    top: 0;
    left: 0;
}

.front-OK {
    -webkit-transform: rotateX(0deg);
    -ms-transform: rotateX(0deg);
    -moz-transform: rotateX(0deg);
    -o-transform: rotateX(0deg);
    transform: rotateX(0deg);
    z-index: 2;
}

.back-OK {
    -webkit-transform: rotateX(-180deg);
    -moz-transform: rotateX(-180deg);
    -o-transform: rotateX(-180deg);
    -ms-transform: rotateX(-180deg);
    transform: rotateX(-180deg);
}

.bbb-OK {
    position: absolute; 
    width: 135px; 
    height: 52px;
}

.front-logo-OK {
    background: url(https://res.hello123.com/logo/hello123.png) no-repeat;
    background-size: 135px 52px;
    -webkit-background-size: 135px 52px;
    -moz-background-size: 135px 52px;
    -ms-background-size: 135px 52px;
    -o-background-size: 135px 52px;
}

.back-OK p {
    font-size: 12px;
    color: #333;
    text-align: center;
    line-height: 52px;
    white-space: nowrap;
}

/* 搜索引擎切换按钮样式 */
.flip-container {
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    -ms-perspective: 1000;
    perspective: 1000;
    -ms-transform: perspective(1000px);
    -moz-transform: perspective(1000px);
    -moz-transform-style: preserve-3d; 
    -ms-transform-style: preserve-3d; 
    position: absolute; 
    top: 4px;
    left: 4px;
}

.flip-container.backimg .back {
    -webkit-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    -ms-transform: rotateY(0deg);
    transform: rotateY(0deg);
}

.flip-container.backimg .front {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -o-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flip-container, .front, .back {
    width: 42px; 
    height: 42px;
}

.flipper {
    -webkit-transition: 0.6s;
    -webkit-transform-style: preserve-3d;
    -ms-transition: 0.6s;
    -moz-transition: 0.6s;
    -moz-transform: perspective(1000px);
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transition: 0.6s;
    transform-style: preserve-3d;
    position: relative;
    cursor: pointer;
}

.flip-container .flipper {
    -webkit-transform-origin: 100% 213.5px;
    -moz-transform-origin: 100% 213.5px;
    -ms-transform-origin: 100% 213.5px;
    transform-origin: 100% 213.5px;
}

.front, .back {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transition: 0.6s;
    -webkit-transform-style: preserve-3d;
    -webkit-transform: rotateY(0deg);
    -moz-transition: 0.6s;
    -moz-transform-style: preserve-3d;
    -moz-transform: rotateY(0deg);
    -o-transition: 0.6s;
    -o-transform-style: preserve-3d;
    -o-transform: rotateY(0deg);
    -ms-transition: 0.6s;
    -ms-transform-style: preserve-3d;
    -ms-transform: rotateY(0deg);
    transition: 0.6s;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    position: absolute;
    top: 0;
    left: 0;
}

.bbb {
    position: absolute; 
    width: 42px; 
    height: 42px;
    border-radius: 21px;
}

.front {
    -webkit-transform: rotateY(0deg);
    -ms-transform: rotateY(0deg);
    -moz-transform: rotateY(0deg);
    -o-transform: rotateY(0deg);
    transform: rotateY(0deg);
    z-index: 2;
}

.back {
    -webkit-transform: rotateY(-180deg);
    -moz-transform: rotateY(-180deg);
    -o-transform: rotateY(-180deg);
    -ms-transform: rotateY(-180deg);
    transform: rotateY(-180deg);
}

.search_box {
    position: relative;
    height: 50px;
    border-radius: 25px;
}

/* 快捷搜索按钮样式 */
.popular {
    padding: 10px 0px 0px 0px; 
    position: absolute;
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    text-align: center;
    box-sizing: border-box;
    width: 300px;
}

.top {
    width: 50px;
    height: 50px;
    float: left;
}

.top img {
    cursor: pointer;
}

.pop {
    display: inline-block;
    background-color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 22.5px;
    box-shadow: 0 0 25px rgba(78,70,70,0.16);
    -webkit-box-shadow: 0 0 25px rgba(78,70,70,0.16);
    border: 6px white;
    transition: transform 0.3s ease;
}

.pop:hover {
    transform: scale(1.1);
}

/* 自动完成下拉框样式 */
.abab #auto {
    position: absolute !important;  /* 改为绝对定位，确保能浮在所有元素之上 */
    top: calc(100% + 10px) !important;  /* 相对于搜索框容器底部 + 10px间距 */
    left: 0 !important;
    width: 100% !important;  /* 与搜索框同宽 */
    background-color: #fff !important;  /* 强制不透明白色背景 */
    border-radius: 15px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15) !important;  /* 增强阴影确保视觉层次 */
    -webkit-box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15) !important;
    padding: 10px;
    z-index: 30 !important;  /* 使用 search-dropdown 层级 */
    max-height: 300px;
    overflow-y: auto;
    /* 确保下拉框完全遮挡下面的内容 */
    isolation: isolate;
    /* 添加边框确保视觉分离 */
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 响应式设计 */
@media screen and (max-width: 1028px) {
    .flip-container-OK {
        left: 45%;
        top: 6%;
    }
    
    .sousuokuang {
        left: 50%;
        width: 500px;
        max-width: 85%;
        top: 32%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
    }
    
    .popular {
        left: 50%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        width: 300px;
        top: 54px;
    }
    
    /* 相对定位下不需要重复设置位置 */
}

@media screen and (max-width: 600px) {
    .sousuokuang {
        left: 50%;
        width: 400px;
        max-width: 90%;
        top: 39%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
    }
    
    .flip-container-OK {
        left: 42%;
        top: 10%;
    }
    
    .popular {
        left: 50%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        width: 300px;
        top: 62px;
    }
    
    /* 相对定位下不需要重复设置位置 */
    
    .search-header-container {
        height: 304px;
    }
}

@media screen and (max-width: 480px) {
    .popular {
        left: 50%;
        transform: translateX(-50%);
        -webkit-transform: translateX(-50%);
        -moz-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        width: 240px;
        top: 62px;
    }
    
    .top {
        width: 40px;
        height: 40px;
    }
    
    .pop {
        width: 38px;
        height: 38px;
        border-radius: 19px;
    }
}



/* 暗色主题样式 */
.dark .search_box {
    background-color: hsl(240 3.7% 15.9%);
}

.dark .searchIpt {
    background-color: hsl(240 3.7% 15.9%);
    color: hsl(0 0% 98%);
    border: 1px solid hsl(240 3.7% 15.9%);
}

.dark .searchIpt::placeholder {
    color: hsl(240 5% 64.9%);
}

.dark .pop {
    background-color: hsl(240 3.7% 15.9%);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    -webkit-box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}

.dark .abab #auto {
    background-color: hsl(240 3.7% 15.9%) !important;  /* 强制不透明背景 */
    color: hsl(0 0% 98%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;  /* 增强阴影 */
    -webkit-box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5) !important;
    z-index: 30 !important;  /* 使用 search-dropdown 层级，与亮色主题保持一致 */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;  /* 暗色主题边框 */
}

 